﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.Common;
using DataAccess;

/// <summary>
/// Summary description for ExamDAL
/// </summary>
public class ExamDAL
{
	public ExamDAL()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public bool Insert(Exam ex)
    {
        bool result = false;
        DbCommand cmd = GenericData.CreateCommand();
        cmd.CommandText = "INSERT INTO Exam(RestrictTime, TotalMark) VALUES(" + ex.RestrictTime +", " + ex.TotalMark +")";
        if (GenericData.ExecuteNoneQuery(cmd) > 0)
            result = true;
        return result;
    }
}